#include "SelectionSort.h"

void
Selection_sort(int* array, int a_size)
{
	register int i, k, k_min, tmp;

	for (i=0 ; i < a_size - 1 ; ++i) {
		k_min = i;
		for (k = i+1 ; k < a_size ; ++k) {
			if (array[k] < array[k_min]) {
				k_min = k;
			}
		}
		tmp = array[i];
		array[i] = array[k_min];
		array[k_min] = tmp;

	}
}
